package com.example.demo.mapper;

import com.example.demo.Dto.SetmealDto;
import com.example.demo.entiy.Dish;
import com.example.demo.entiy.Setmeal;
import com.example.demo.entiy.SetmealDish;
import com.github.pagehelper.Page;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface SetmealMapper {
    /**
     * delete by primary key
     * @param id primaryKey
     * @return deleteCount
     */
    int deleteByPrimaryKey(Long id);

    /**
     * insert record to table
     * @param record the record
     * @return insert count
     */
    int insert(Setmeal record);

    /**
     * insert record to table selective
     * @param record the record
     * @return insert count
     */
    int insertSelective(Setmeal record);

    /**
     * select by primary key
     * @param id primary key
     * @return object by primary key
     */
    Setmeal selectByPrimaryKey(Long id);

    /**
     * update record selective
     * @param record the updated record
     * @return update count
     */
    int updateByPrimaryKeySelective(Setmeal record);

    /**
     * update record
     * @param record the updated record
     * @return update count
     */
    int updateByPrimaryKey(Setmeal record);
    @Select("select * from setmeal where category_id = #{ids}")
    List<Setmeal> selectBycata(Long ids);
    Page<Setmeal> getPage(int page, int pageSize,String name);

    int changeStatus(int status, List<Long> ids);

    int deleteByid(List<Long> id);

    List<Long> selectById(List<Long> id);
}